home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1996 May & June / Amiga-CD 1996 #5-6.iso / demos / finaldata / hdinstall < prev    next >
Text File  |  1996-03-22  |  8KB  |  253 lines

  1. ;;
  2. ;;  $Filename: HDInstall $
  3. ;;  $Date: 1994/10/24 11:37:51 $
  4. ;;  $Revision: 1.2 $
  5. ;;
  6.  
  7. (set is_update 0)
  8. (set @user-level 1)  ; force to use average mode
  9. (complete 0)
  10.  
  11. (set FD_dest
  12.    (askdir
  13.       (prompt "In welcher Disk/Schublade soll Final Data erstellt werden?")
  14.       (help "Das Installationsprogramm erstellt die Schublade "
  15.          "\"FinalData_D\" in diesem Verzeichnis. Alle Dateien von "
  16.          "Final Data werden in dieses Verzeichnis kopiert. \n\n"
  17.          "Tip für erfahrene Benutzer:\n"
  18.          "FinalData kann auch in ein anderes Verzeichnis "
  19.          "verschoben werden, wenn die Unterverzeichnisse:\n"
  20.          "FDFiles, FDFonts und FDLibs\n"
  21.          "ebenfalls an die neue Position des Programms verschoben "
  22.          "werden.")
  23.       (default @default-dest)
  24.    )
  25. )
  26.  
  27. ; Check if this is an update
  28. ; the FDLibs directory is a tell-tale sign
  29. ; that FD is already installed here
  30. (if (exists (tackon FD_dest "FDLibs"))
  31.    (set is_update 1)
  32.    (  (if (exists (tackon FD_dest "FinalData_D"))
  33.          (set is_update 1)
  34.          (makedir (tackon FD_dest "FinalData_D") (infos))
  35.       )
  36.       (set FD_dest (tackon FD_dest "FinalData_D"))
  37.    )
  38. )
  39.  
  40. (set @default-dest FD_dest)
  41. (set disk_space (getdiskspace FD_dest))
  42.  
  43. (set disk_space_needed 500000)
  44.  
  45. (if (AND (< disk_space disk_space_needed) (NOT is_update))
  46.    (
  47.       (set answer1
  48.          (askbool
  49.             (prompt  "Auf dem Laufwerk ist möglicherweise nicht "
  50.                "genügend Platz für die Installation von "
  51.                "\"Final Data\".  Trotzdem fortsetzen?")
  52.             (help "Final Data benötigt für die vollständige "
  53.                "Installation ca. 0,5 MegaByte freien Speicherplatz auf "
  54.                "der Disk. Wenn Final Data auf dieser Partition "
  55.                "bereits installiert ist, können Sie die Installation "
  56.                "fortsetzen. Andernfalls drücken Sie ABBRUCH "
  57.                "oder NEIN und schaffen danach entweder Platz "
  58.                "auf dieser Partition oder wählen eine andere "
  59.                "Partition für die Installation aus.")
  60.          )
  61.       )
  62.       (if (NOT answer1)
  63.          (abort "Installation von Final Data abgebrochen. Zu wenig "
  64.             "Speicherplatz auf dem Datenträger \""
  65.                (getdevice @default-dest)
  66.                "\"."
  67.          )
  68.       )
  69.    )
  70. )
  71.  
  72. ; Allow updating user to select what they want updated
  73. (if is_update
  74.    ; YES - already installed
  75.    (set install_options
  76.       (askoptions
  77.          (prompt "Welche Komponenten sollen aktualisiert werden?")
  78.          (help @askoptions-help)
  79.          (choices
  80.             "Final Data - Programm"
  81.             "ARexx-Makros"
  82.             "Beispieldateien"
  83.             "Systemdateien"
  84.             "Systembibliotheken"
  85.             "Systemschriftarten")
  86.          (default 25)      ; default to 0001-1001 = (1)Program, (8)Sys Files and (16)Libraries
  87.       )
  88.    )
  89.  
  90.    ; NO - First time install
  91.       (set install_options 63)   ; hex 3F - 0011-1111 - all six options on
  92. )
  93.  
  94. (set error 0)
  95.  
  96. ; Installing Files from FDProgram
  97. (if (IN install_options 0 1 2 3 4 5)
  98.    (
  99.       ; -----------------
  100.       ; Copy the More program to the hard drive
  101.       ; so everyone is guaranteed to have it.
  102.       ; -----------------
  103.       (if (NOT is_update)
  104.          (copyfiles
  105.             (source "Amiga_1996_5:Demos/FinalData/More")
  106.             (dest FD_dest)
  107.          )
  108.       )
  109.       ; -----------------
  110.       ; If installing/updating the program
  111.       ; -----------------
  112.       (if (IN install_options 0)
  113.          (
  114.             ; ----- COPY the Final Data program over
  115.             (working "Final Data - Programm wird von der Diskette "
  116.                   "FDProgram installiert.")
  117.             (copyfiles
  118.                (source "Amiga_1996_5:Demos/FinalData/FinalData")
  119.                (dest FD_dest)
  120.             )
  121.             ; ----- COPY the Final Data .info if the icon doesn't exists
  122.             (if (NOT (exists (tackon FD_dest "FinalData.info")))
  123.                (copyfiles
  124.                   (source "Amiga_1996_5:Demos/FinalData/FinalData.info")
  125.                   (dest FD_dest)
  126.                )
  127.             )
  128.          )
  129.       )
  130.       (complete 50)
  131.  
  132.  
  133.       ; -----------------
  134.       ; Installing FDMacros
  135.       ; -----------------
  136.       (if (IN install_options 1)
  137.          (
  138.             ; ----- CREATE FDMacros if it doesn't exist.
  139.             (if (NOT (exists (tackon FD_dest "FDMacros")))
  140.                (
  141.                (makedir (tackon FD_dest "FDMacros") (infos))
  142.                )
  143.             )
  144.             (working "ARexx-Makros werden von der Diskette "
  145.                   "FDProgram installiert.")
  146.             (copyfiles
  147.                (source "Amiga_1996_5:Demos/FinalData/FDMacros")
  148.                (dest (tackon FD_dest "FDMacros"))
  149.                (all)
  150.             )
  151.          )
  152.       )
  153.       (complete 60)
  154.  
  155.  
  156.       ; -----------------
  157.       ; Installing FDData
  158.       ; -----------------
  159.       (if (IN install_options 2)
  160.          (
  161.             ; If FDData doesn't exist, create it.
  162.             (if (NOT (exists (tackon FD_dest "FDData")))
  163.                (
  164.                (makedir (tackon FD_dest "FDData") (infos))
  165.                )
  166.             )
  167.             (working "Beispieldateien werden von der Diskette "
  168.                   "FDProgram installiert.")
  169.             (copyfiles
  170.                (source "Amiga_1996_5:Demos/FinalData/FDData")
  171.                (dest (tackon FD_dest "FDData"))
  172.                (all)
  173.             )
  174.          )
  175.       )
  176.       (complete 70)
  177.  
  178.       ; -----------------
  179.       ; Installing FDFiles (make dir, do not copy .prefs)
  180.       ; -----------------
  181.       (if (IN install_options 3)
  182.          (
  183.             ; If FDFiles doesn't exist, create it.
  184.             (if (NOT (exists (tackon FD_dest "FDFiles")))
  185.                (
  186.                (working "Systemdateien werden von der Diskette "
  187.                   "FDProgram installiert.")
  188.                (makedir (tackon FD_dest "FDFiles") (infos))
  189.                )
  190.             )
  191.          )
  192.       )
  193.       (complete 80)
  194.  
  195.       ; -----------------
  196.       ; Installing FDLibs
  197.       ; -----------------
  198.       (if (IN install_options 4)
  199.          (
  200.             ; If FDLibs doesn't exist, create it.
  201.             (if (NOT (exists (tackon FD_dest "FDLibs")))
  202.                (
  203.                (makedir (tackon FD_dest "FDLibs") (infos))
  204.                )
  205.             )
  206.             (working "Systembibliotheken werden von der Diskette "
  207.                   "FDProgram installiert.")
  208.             (if (< (/ (getversion) 65536) 37)
  209.                 (copyfiles
  210.                   (source "Amiga_1996_5:Demos/FinalData/FDLibs/iffparse.library")
  211.                   (dest (tackon FD_dest "FDLibs"))
  212.                   (files)
  213.                 )
  214.             )
  215.             (copyfiles
  216.                (source "Amiga_1996_5:Demos/FinalData/FDLibs/fcswlib.library")
  217.                (dest (tackon FD_dest "FDLibs"))
  218.                (files)
  219.             )
  220.          )
  221.       )
  222.       (complete 90)
  223.  
  224.  
  225.       ; -----------------
  226.       ; Installing FDFonts
  227.       ; -----------------
  228.       (if (IN install_options 5)
  229.          (
  230.             ; If FDFonts doesn't exist, create it.
  231.             (if (NOT (exists (tackon FD_dest "FDFonts")))
  232.                (
  233.                (makedir (tackon FD_dest "FDFonts") (infos))
  234.                )
  235.             )
  236.             (working "Systemschriftarten werden von der Diskette "
  237.                   "FDProgram installiert.")
  238.             (copyfiles
  239.                (source "Amiga_1996_5:Demos/FinalData/FDFonts")
  240.                (dest (tackon FD_dest "FDFonts"))
  241.                (all)
  242.             )
  243.  
  244.             (run ("Avail FLUSH"))
  245.          )
  246.       )
  247.    )
  248. )
  249.  
  250. (complete 100)
  251.  
  252. (exit)
  253.